package cn.bonoon.kernel.menus;

import cn.bonoon.kernel.config.SortableItem;

public class TabItem extends SortableItem{
	private final ITabParser parser;
	private final TabInfo tabs;
	
	public TabItem(TabInfo tabs, ITabParser parser){
		this.tabs = tabs;
		this.parser = parser;
	}

	public TabItem(int ordinal, String id, String name, TabInfo tabs, ITabParser parser){
		this.id = id;
		this.name = name;
		this.ordinal = ordinal;
		this.tabs = tabs;
		this.parser = parser;
	}

	public ITabParser getParser() {
		return parser;
	}

	public TabInfo getTabs() {
		return tabs;
	}

	public void init(IModuleContext context) {
		parser.init(context, this);
	}
}
